<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" name="row[name]" type="text" value="{$row['nickname']|htmlentities}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row['mobile']|htmlentities}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('申请时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" readonly data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
        </div>
    </div>
    {foreach name="row['product']" item="vo" key="key"}
    <div class="form-group ajax-append">
        <div class="col-xs-12 col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <span class="col-sm-3">{$vo.name}</span>
                    <div class="col-sm-8"></div>
                    <a href="javascript:;" data-product="{$vo.name}" class="btn btn-xs btn-danger btn-delone deletes"><i class="fa fa-trash"></i></a>
                </div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('政策')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select id="{$key}" data-rule="required" required class="form-control selectpicker" name="policy[{$vo.id}][policy_id]">
                                <option value="">--请选择--</option>
                                {foreach name="vo.policy" item="v"}
                                <option value="{$v.id}">{$v.title}</option>
                                {/foreach}
                            </select>
                        </div>
                        <input type="hidden" name="policy[{$vo.id}][product_id]" value="{$vo.id}">
                        <input type="hidden" name="policy[{$vo.id}][product_name]" value="{$vo.name}">
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">是否设为默认:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="radio">
                                <label><input name="policy[{$vo.id}][default]" type="radio" value="1" checked/> 是</label>
                                <label><input name="policy[{$vo.id}][default]" type="radio" value="0"/> 否</label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {/foreach}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
